﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<link href="~/BootstrapS/css/bootstrap.min14ed.css" rel="stylesheet" />
<link href="~/BootstrapS/css/font-awesome.min93e3.css" rel="stylesheet" />
<link href="~/BootstrapS/css/animate.min.css" rel="stylesheet" />
<link href="~/BootstrapS/css/style.min862f.css" rel="stylesheet" />
<script src="~/vue/vue.min.js"></script>
<script src="~/vue/axios.min.js"></script>


<body>
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="font-size:30px">&times;</button>
        <h3 class="modal-title" id="myModalLabel">支付费用</h3>
    </div>
    <div id="addtab">
        <div style="width:45%;float:left;margin-left:20px;margin-top:15px">
            病人编号<br />
            <select class="btn btn-outline btn-success" v-on:change="fan" v-model="huoqu.Patient_Id" style="width:200px">
                <option style="background-color:white;color:black" v-bind:value="0">请选择病人编号</option>
                <option style="background-color:white;color:black" v-for="item in info" v-bind:value="item.patient_Id">{{item.patient_Num}}</option>
            </select>
            <br /><br /><br />
            挂号科室
            <input type="search" class="form-control input-sm"v-bind:value="0" style="width:240px">
            <br /><br />
            费用类型
            <input type="search" class="form-control input-sm" v-for="item in ft" v-model="item.patientInfor_registration " style="width:240px">
            <br /><br />
            优惠方式<br />
            <select class="btn btn-outline btn-success" style="width:200px">
                <option style="background-color:white;color:black" >请选择优惠方式</option>
                <option style="background-color:white;color:black" v-for="discount in bangyh" v-bind:value="discount.discount_Id">{{discount.discount_Name}}</option>
            </select>
            <br /><br /><br />
            实付金额
            <input type="search" class="form-control input-sm" style="width:240px">
            <br /><br />
        </div>
        <div style="width:45%;float:right;margin-left:10px;margin-top:15px">
            病人姓名
            <input type="search" class="form-control input-sm" v-for="item in ft" v-model="item.patient_Name" style="width:240px" placeholder="请输入病人编号">
            <br /><br />
            挂号日期
            <input type="search" class="form-control input-sm" v-for="item in ft" v-model="item.patient_Date" style="width:240px">
            <br /><br />
            医生姓名
            <input type="search" class="form-control input-sm" v-for="item in ft" v-model="item.doctor_Name" style="width:240px">
            <br /><br />
            总计金额
            <input type="search" class="form-control input-sm" style="width:240px">
            <br /><br />
            支付方式
            <select class="btn btn-outline btn-success" style="width:200px">
                <option style="background-color:white;color:black">请选择支付方式</option>
                <option style="background-color:white;color:black" v-for="chargeType in zffs" v-bind:value="chargeType.chargeType_Id">{{chargeType.chargeType_Name}}</option>
            </select>
            <br /><br /><br />
        </div>
    </div>
    <div class="modal-footer">
        <div>
            <button type="button" class="btn btn-outline btn-default" data-dismiss="modal">退出</button>
            <button type="button" class="btn btn-outline btn-warning">提交</button>
        </div>
    </div>
</body>
<script src="~/BootstrapS/js/jquery.min.js"></script>
<script src="~/BootstrapS/js/bootstrap.min.js"></script>
<script src="~/BootstrapS/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="~/BootstrapS/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="~/BootstrapS/js/plugins/layer/layer.min.js"></script>
<script src="~/BootstrapS/js/hplus.min.js"></script>
<script src="~/BootstrapS/js/contabs.min.js"></script>
<script src="~/BootstrapS/js/plugins/pace/pace.min.js"></script>
<script>
    new Vue({
        el: '#addtab',
        data: {
            info: '',
            bangyh: '',
            zffs:'',
            ft: {
                patient_Name: ''
            },
            huoqu: {
                Patient_Id: 0
            },
            addpay: {

            },
        },
        mounted() {
            function asd() {
                return axios
                    .get('/Payment/BindPatient');
            }
            function qwe() {
                return axios
                    .get('/Payment/BangDiscount')
            }
            function zxc() {
                return axios
                    .get('/Payment/BangChargeType')
            }
            axios.all([asd(), qwe(), zxc()])
                .then(axios.spread((infos, bangyhs,zffss) => {
                    this.info = infos.data;
                    this.bangyh = bangyhs.data;
                    this.zffs = zffss.data;
                }))
                .catch(err => {
                    console.log(err);
                })
        },
        methods: {
            fan: function () {
                if (this.huoqu.Patient_Id == 0) {
                    location.reload();
                } else {
                    axios
                        .get('/Payment/FanTian', {
                            params: { fid: this.huoqu.Patient_Id }
                        })
                        .then(response => (this.ft = response.data))
                        .catch(function (error) { // 请求失败处理
                            console.log(error);
                        });
                }
            }
        }
    })
</script>
